<script>
$(document).ready(function(){
	{params}
	
	var c = {
		init:function(){
			this.showagent();
		},
		showagent:function(){
			if(!reim.alldata)return;
			var da = reim.alldata.agentarr,agedt={},d,ty,len,d1,s='',i,sto;
			for(i=0;i<da.length;i++){
				d  = da[i];
				ty = d.type;
				if(!agedt[ty])agedt[ty]=[];
				agedt[ty].push(d);
			}
			for(ty in agedt){
				d1 	= agedt[ty];
				len	= d1.length;
				s+='<div style="color:#aaaaaa;padding-left:20px;margin-bottom:10px;padding:5px;border-bottom:1px solid #eeeeee;font-size:14px">&nbsp;&nbsp;'+ty+'('+len+')</div>';
				s+='<div class="agenhclsdiv">';
				for(i=0;i<len;i++){
					d = d1[i];
					sto = d.stotal;
					if(!sto || sto=='0')sto='';
					s+='<div onclick="reim.openagent(\''+d.id+'\')" class="agenhcls"><div><img src="'+getface(d.icons)+'"></div><div>'+d.name+'</div>';
					s+='<span id="agenh_stotal_'+d.id+'" class="badge">'+sto+'</span>';
					s+='</div>';
				}
				s+='</div>';
			}
			$('#agenhviewshow').html(s);
		}
	}
	c.init();
	reim.tagent = c;
});
</script>
<div id="agenhview" align="center">
<div id="agenhviewshow" style="width:80%;padding:20px" align="left">
</div>
</div>